<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<script>
    window.onload = function () { 
        var oBtn = document.getElementById("btn");
        var oSpan = document.getElementsByTagName("span")[0];
        var i = 10;
        oBtn.onclick = function () { 
            i--;
            oSpan.innerHTML = i;
         }
     }
</script>
<body>
    <input type="button" value="start" id="btn">
    <span>10</span>
</body>
</html>